/*
 *  naive.h
 *  StringSearch
 *
 *  Created by Mohammad H. Afrasiabi on 09-11-16.
 *  Copyright 2009 UBC. All rights reserved.
 *
 */

/*!
 @header naive
 @abstract   Naive string search algorithm 
 @discussion .
*/

#pragma once

#include "disp.h"

#define ADD_RESULT(__result) Disp_Add_Result(__result)

/*!
 @function
 @abstract   Initialize Naive String Search
 @discussion Initialize and sets the pattern buffer
 @param      pattern Buffer to pattern string
 @param      patternSize Size of the pattern string
 */
int Naive_Init(char * pattern, int patternSize);

/*!
 @function
 @abstract   Naive String Search
 @discussion Upon invokation function returns all the rusults by calling ADD_RESULT directive. 
 @param      text Buffer of text
 @param      textSize Size of text buffer
 */
void Naive_Search(char * text, int textSize);

